<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-personal-edit" th:object="${personal}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">病人姓名：</label>
                <div class="col-sm-8">
                    <input id="patientName" name="patientName" th:field="*{patientName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">性别：</label>
                <div class="col-sm-8">
                    <input id="patientSex" name="patientSex" th:field="*{patientSex}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">年龄：</label>
                <div class="col-sm-8">
                    <input id="patientAge" name="patientAge" th:field="*{patientAge}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">手机号：</label>
                <div class="col-sm-8">
                    <input id="patientPhone" name="patientPhone" th:field="*{patientPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">身份证号：</label>
                <div class="col-sm-8">
                    <input id="patientCard" name="patientCard" th:field="*{patientCard}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">病人地址：</label>
                <div class="col-sm-8">
                    <input id="patientAddress" name="patientAddress" th:field="*{patientAddress}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
				<label class="col-sm-3 control-label">病种：</label>
				<div class="col-sm-8">
					<select id="icdCode" name="patientBingname" class="form-control" ><!--  th:disabled="${post.status == '1'}"判断 -->
						<option th:each="post:${posts}" th:value="${post.id}" th:text="${post.idcName}" th:selected="${post.flag}"></option>
					</select>
					
				</div>
			</div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">家属名称：</label>
                <div class="col-sm-8">
                    <input id="patientJiashuname" name="patientJiashuname" th:field="*{patientJiashuname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">家属手机号：</label>
                <div class="col-sm-8">
                    <input id="patientJiashuphone" name="patientJiashuphone" th:field="*{patientJiashuphone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">与病人关系：</label>
                <div class="col-sm-8">
                    <input id="patientGuanxi" name="patientGuanxi" th:field="*{patientGuanxi}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
				<label class="col-sm-3 control-label">是否传染病：</label>
				<div class="col-sm-8">
					<select class="form-control" id="patientSfcrb" name="patientSfcrb" th:field="*{patientSfcrb}">
				       	<option  th:value="是" th:selected="${patientSfcrb == '是'?true : false}">是</option>
				        <option th:value="否" th:selected="${patientSfcrb == '否'?true : false}">否</option>
				    </select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">是否启动疾病预案：</label>
				<div class="col-sm-8">
					<select class="form-control" id="yuanYesOnNo" name="yuanYesOnNo" th:field="*{yuanYesOnNo}">
<!-- 						<option  th:value="">---请选择---</option> -->
				        <option  th:value="是" th:selected="${yuanYesOnNo == '是'?true : false}">是</option>
				        <option th:value="否" th:selected="${yuanYesOnNo == '否'?true : false}">否</option>
				    </select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">疾病预案选择：</label>
				<div class="col-sm-8">
					<select class="form-control" id="yuanName" name="yuanName" th:field="*{yuanName}">
<!-- 						<option th:value="">---请选择---</option> -->
				        <option th:value="传染病" th:selected="${yuanName == '传染病'?true : false}">传染病</option>
				        <option th:value="急诊" th:selected="${yuanName == '急诊'?true : false}">急诊</option>
				        <option th:value="手足口" th:selected="${yuanName == '手足口'?true : false}">手足口</option>
				        <option th:value="紧急病种" th:selected="${yuanName == '紧急病种'?true : false}">紧急病种</option>
				        <option th:value="空气传播类型" th:selected="${yuanName == '空气传播类型'?true : false}">空气传播类型</option>
				        <option th:value="动物传播类型" th:selected="${yuanName == '动物传播类型'?true : false}">动物传播类型</option>
				    </select>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "module/personal"
		$("#form-personal-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-personal-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
